package com.agent.user.api.feign;

import com.agent.common.result.ApiResponse;
import com.agent.user.api.resp.AdminUserResp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 管理员用户Feign客户端
 * @author Jeff_Wan
 * @description 管理员用户Feign接口
 */
@FeignClient(name = "agent-user", contextId = "adminUser", path = "/api/admin/users")
public interface AdminUserFeignClient {

    /**
     * 获取管理员用户信息
     * @param username 用户名
     * @return 用户信息
     */
    @GetMapping("/info/username")
    ApiResponse<AdminUserResp> getUserByUsername(@RequestParam("username") String username);
}